IndicesOf Generic Method

Wintellect PowerCollections

Collapse imageExpand ImageCollapseAll imageExpandAll imageDropDown imageDropDownHover imageCopy imageCopyHover image
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Enumerates the indices of all the items in a list equal to a given item. A passed IEqualityComparer is used to determine equality.

Namespace: Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax

C#
public static IEnumerable<int> IndicesOf<T>(
	IList<T> list,
	T item,
	IEqualityComparer<T> equalityComparer
)
Visual Basic (Declaration)
Public Shared Function IndicesOf(Of T) ( _
	list As IList(Of T), _
	item As T, _
	equalityComparer As IEqualityComparer(Of T) _
) As IEnumerable(Of Integer)
Visual C++
public:
generic<typename T>
static IEnumerable<int>^ IndicesOf (
	IList<T>^ list, 
	T item, 
	IEqualityComparer<T>^ equalityComparer
)

Parameters

list
IList<(Of <T>)>
The list to search.
item
T
The item to search for.
equalityComparer
IEqualityComparer<(Of <T>)>
The IEqualityComparer<T> used to compare items for equality. Only the Equals method will be called.

Return Value

An IEnumerable<T> that enumerates the indices of items equal to item.

Type Parameters

T

See Also